package main

import (
	"fmt"
	"log"
	"net/http"
)

func sayHello(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintf(w, "hi...")
}

func main() {
	http.HandleFunc("/", sayHello)

	log.Println("【默认项目】服务启动成功 监听端口 8080")

	er := http.ListenAndServe("0.0.0.0:80", nil)
	if er != nil {
		log.Fatal("ListenAndServe: ", er)
	}

}
